home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 1.toast / pc / sample code / devices and hardware / scsi / scsi driveid sample / scsidriveidsample.c < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-23  |  1.6 KB  |  56 lines

  1. /*
  2.     File:        SCSIDriveIDSample.c
  3.  
  4.     Contains:    This sample shows how to convert from drive ID or volume name/id to the
  5.                  associated SCSI Bus ID using both the old and new SCSI Managers.
  6.  
  7.     Written by: Martin Minow    
  8.  
  9.     Copyright:    Copyright © 1992-1999 by Apple Computer, Inc., All Rights Reserved.
  10.  
  11.                 You may incorporate this Apple sample source code into your program(s) without
  12.                 restriction. This Apple sample source code has been provided "AS IS" and the
  13.                 responsibility for its operation is yours. You are not permitted to redistribute
  14.                 this Apple sample source code as "Apple sample source code" after having made
  15.                 changes. If you're going to re-distribute the source, we require that you make
  16.                 it clear in the source that the code was descended from Apple sample source
  17.                 code, but that you've made changes.
  18.  
  19.     Change History (most recent first):
  20.                 7/14/1999    Karl Groethe    Updated for Metrowerks Codewarror Pro 2.1
  21.                 
  22.  
  23. */
  24. #include <Folders.h>
  25. #include <stdio.h>
  26. #ifdef THINK_C
  27. #include <console.h>
  28. #endif
  29.  
  30. void                    ShowAllDriveQueueElements(void);
  31. void                    ShowAllMountedVolumeNames(void);
  32. void                    ShowRegisteredSCSIDevices(void);
  33. void                    ShowSystemVolumeName(void);
  34.  
  35. void
  36. main(
  37. #ifdef THINK_C
  38.         int                    argc,
  39.         char                **argv
  40. #endif
  41.     )
  42. {
  43. #ifdef THINK_C
  44.         argc = ccommand(&argv);
  45. #endif
  46.         printf("*** System Volume Name ***\n");
  47.         ShowSystemVolumeName();
  48.         printf("*** Driver Queue Elements ***\n");
  49.         ShowAllDriveQueueElements();
  50.         printf("\n*** Mounted Volumes ***\n");
  51.         ShowAllMountedVolumeNames();
  52.         printf("\n*** Registered Devices ***\n");
  53.         ShowRegisteredSCSIDevices();
  54. }
  55.  
  56.